<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>折行与行间距</title>
    <style>
        .box{
            width: 500px;
            height: 500px;
            border: 1px solid black;
            margin: 0 auto;
            display: flex;
            /*子元素超过宽度 允许折行 折行以后会等间距排列*/
            flex-wrap: wrap;
            /*折行以后 显示效果
             flex-start:  主轴开始
            flex-end:  主轴结束
            center: 主轴居中
            space-around: 距离环绕 每个子元素占用空间一样
            space-between: 子元素两端对齐
            */
            align-content: flex-start;
        }
        .box div{
            width: 120px;
            height: 120px;
            border: 1px dashed red;
        }

    </style>
</head>
<body>
    <div class="box">
        <div>11111111</div>
        <div>22222222</div>
        <div>33333334</div>
        <div>44444444</div>
        <div>55555555</div>
        <div>66666666</div>
        <div>77777777</div>
        <div>88888888</div>
        <div>11111111</div>
        <div>22222222</div>
        <div>33333334</div>
        <div>44444444</div>
    </div>
</body>
</html>